package jia.editor.forms;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JOptionPane;
import jia.editor.EditorMain;
import jia.editor.lists.pnl_RacesList;
import jia.game.GenericFlags;
import jia.persist.Race;
import jia.tools.PanelSwapper;
import jia.tools.RandomGUID;
import jia.tools.StringUtils;
import org.apache.log4j.Logger;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Node;
import org.dom4j.io.SAXReader;
import org.dom4j.io.XMLWriter;

/**
 *
 * @author Erik Stell
 * @since  November 9, 2007, 8:32 AM
 * @version 1.0
 */
public class RacesForm extends javax.swing.JPanel {
    private static final Logger log = Logger.getLogger(RacesForm.class);
    private boolean isNew = false;
    private Race thisRaceObj;
    /** Creates new form RacesForm */
    public RacesForm() {
        initComponents();
        isNew = true;
    }
    
    public RacesForm(Race raceObj){
        initComponents();
        thisRaceObj = raceObj;
        //map stored bean values to the form
        try{
            //load the xml file
            org.dom4j.Document doc = loadXmlDoc(thisRaceObj.getRACE_ID());
            
            //map the xml document values to the form
            mapData(doc);
            isNew = false;
        }catch(Exception e){
            log.error(e);
        }
        repaint();
    }
    
    public RacesForm(String raceId){
        initComponents();
        try{
            thisRaceObj = (Race)EditorMain.sqlMap.queryForObject("getRace", raceId);
            //load the xml file
            org.dom4j.Document doc = loadXmlDoc(thisRaceObj.getRACE_GUID());
            //map the xml document values to the form
            mapData(doc);
            isNew = false;
        }catch(Exception e){
            log.error(e);
        }
        repaint();
    }
    
    private org.dom4j.Document loadXmlDoc(String raceId){
        //TODO:  add logic here that will load the correct xml document
        SAXReader reader = new SAXReader();
        org.dom4j.Document doc = null;
        try {
            doc = reader.read("resources/res02/" + raceId + ".xml");
        } catch (DocumentException ex) {
            ex.printStackTrace();
        }
        
        //TODO:  run decryption process before returning the document!
        
        return doc;
    }
    
    private void mapData(org.dom4j.Document thisDoc){
        //take the loaded xml doc and map it to the correct form fields.
        try{
            this.jtf_RaceName.setText(thisDoc.selectSingleNode("//race/name").getText());
            this.jtf_RaceMovement.setText(thisDoc.selectSingleNode("//race/baseMovement").getText());
        }catch(Exception e){
            log.error("Error setting name and movement");
        }


        try{
            Node heightNode = thisDoc.selectSingleNode("//race/height");
            log.error(heightNode.toString());
            this.spnr_HeightRoll.setValue(new Integer(heightNode.valueOf("@roll")).intValue());
            this.spnr_HeightSides.setValue(new Integer(heightNode.valueOf("@sides")).intValue());
            this.spnr_HeightMod.setValue(new Integer(heightNode.valueOf("@plusMode")).intValue());
        }catch(Exception e){
            log.error("Error setting height");
        }
        try{
            Node weightNode = thisDoc.selectSingleNode("//race/weight");
            this.spnr_WeightRoll.setValue(new Integer(weightNode.valueOf("@roll")).intValue());
            this.spnr_WeightSides.setValue(new Integer(weightNode.valueOf("@sides")).intValue());
            this.spnr_WeightMod.setValue(new Integer(weightNode.valueOf("@plusMode")).intValue());
        }catch(Exception e){
            log.error("Error setting weight");
        }
        try{
            Node ageNode = thisDoc.selectSingleNode("/race/ageDice");
            this.spnr_AgeRoll.setValue(new Integer(ageNode.valueOf("@roll")).intValue());
            this.spnr_AgeSides.setValue(new Integer(ageNode.valueOf("@sides")).intValue());
            this.spnr_AgeMod.setValue(new Integer(ageNode.valueOf("@plusMod")).intValue());
        }catch(Exception e){
            log.error("Error setting age");
        }
        try{
            Node maxAgeNode = thisDoc.selectSingleNode("/race/maxAge");
            this.spnr_MaxAgeRoll.setValue(new Integer(maxAgeNode.valueOf("@roll")).intValue());
            this.spnr_MaxAgeSides.setValue(new Integer(maxAgeNode.valueOf("@sides")).intValue());
            this.spnr_MaxAgeMod.setValue(new Integer(maxAgeNode.valueOf("@plusMod")).intValue());
        }catch(Exception e){
            log.error("Error setting max age");
        }
        try{
            
            Node StrNode = thisDoc.selectSingleNode("/race/abilityRequirements/requirement[@name='Strength']");
            
            Node DexNode = thisDoc.selectSingleNode("/race/abilityRequirements/requirement[@name='Dexterity']");
            Node ConNode = thisDoc.selectSingleNode("/race/abilityRequirements/requirement[@name='Constitution']");
            Node IntNode = thisDoc.selectSingleNode("/race/abilityRequirements/requirement[@name='Intelligence']");
            Node WisNode = thisDoc.selectSingleNode("/race/abilityRequirements/requirement[@name='Wisdom']");
            Node ChaNode = thisDoc.selectSingleNode("/race/abilityRequirements/requirement[@name='Charisma']");
            
            this.spnr_StrMin.setValue(new Integer(StrNode.valueOf("@minimum")).intValue());
            this.spnr_StrMax.setValue(new Integer(StrNode.valueOf("@maximum")).intValue());
            this.spnr_StrMaxMod.setValue(new Integer(StrNode.valueOf("@maxMod")).intValue());
            
            this.spnr_DexMin.setValue(new Integer(DexNode.valueOf("@minimum")).intValue());
            this.spnr_DexMax.setValue(new Integer(DexNode.valueOf("@maximum")).intValue());
            this.spnr_DexMaxMod.setValue(new Integer(DexNode.valueOf("@maxMod")).intValue());
            
            this.spnr_ConMin.setValue(new Integer(ConNode.valueOf("@minimum")).intValue());
            this.spnr_ConMax.setValue(new Integer(ConNode.valueOf("@maximum")).intValue());
            this.spnr_ConMod.setValue(new Integer(ConNode.valueOf("@maxMod")).intValue());
            
            this.spnr_IntMin.setValue(new Integer(IntNode.valueOf("@minimum")).intValue());
            this.spnr_IntMax.setValue(new Integer(IntNode.valueOf("@maximum")).intValue());
            this.spnr_IntMod.setValue(new Integer(IntNode.valueOf("@maxMod")).intValue());
            
            this.spnr_WisMin.setValue(new Integer(WisNode.valueOf("@minimum")).intValue());
            this.spnr_WisMax.setValue(new Integer(WisNode.valueOf("@maximum")).intValue());
            this.spnr_WisMod.setValue(new Integer(WisNode.valueOf("@maxMod")).intValue());
            
            this.spnr_ChaMin.setValue(new Integer(ChaNode.valueOf("@minimum")).intValue());
            this.spnr_ChaMax.setValue(new Integer(ChaNode.valueOf("@maximum")).intValue());
            this.spnr_ChaMod.setValue(new Integer(ChaNode.valueOf("@maxMod")).intValue());
            
            
            
        }catch(Exception e){
            log.error("Error setting min values");
        }

        List descNodes = thisDoc.selectNodes("/race/description/para");
        StringBuffer formattedDesc = new StringBuffer();
        for (int i=0; i < descNodes.size(); i++){
            Node tmpNode = (Node)descNodes.get(i);

            String tmp = tmpNode.getStringValue();
            formattedDesc.append(tmp);
            formattedDesc.append("\r\n\r\n");

        }
        this.jtf_Desc.setText(formattedDesc.toString());
        
    }
    
    private int createDataObj(String raceId) throws SQLException{
        //If saving a new record, create a new persistance object.
        int retVal = 1;
        thisRaceObj = new Race();
        
        thisRaceObj.setRACE_NAME(this.jtf_RaceName.getText());
        thisRaceObj.setRACE_ID("1");
        thisRaceObj.setRACE_GUID(raceId);
        thisRaceObj.setRACE_DESC(this.jtf_Desc.getText());
        thisRaceObj.setISENABLED(Short.valueOf("1"));
        thisRaceObj.setISLOCKED(Short.valueOf("1"));
        thisRaceObj.setAUTHOR_NAME(GenericFlags.authorName);
        thisRaceObj.setLOCK_PASS("");
        
        //Now that we have creatd the object, write it to the database
        try {
            //EditorMain.sqlMap.startTransaction();
            //get the data for this table (to be used later)
            Object d = EditorMain.sqlMap.insert("insertRace", thisRaceObj);
            //EditorMain.sqlMap.commitTransaction();
        } catch (SQLException ex) {
            retVal = 0;
            log.error(ex);
        }finally{
            //EditorMain.sqlMap.endTransaction();
        }
        return retVal;
    }

    private int saveDataObj(String raceId) throws SQLException{
        //If saving a new record, create a new persistance object.
        int retVal = 1;
        thisRaceObj = (Race)EditorMain.sqlMap.queryForObject("getRace", raceId);

        thisRaceObj.setRACE_NAME(this.jtf_RaceName.getText());
        //newRaceObj.setRACE_ID("1");
        //newRaceObj.setRACE_GUID(raceId);
        //thisRaceObj.setRACE_DESC(this.jtf_Desc.getText());
        thisRaceObj.setISENABLED(Short.valueOf("1"));
        thisRaceObj.setISLOCKED(Short.valueOf("1"));
        thisRaceObj.setAUTHOR_NAME(GenericFlags.authorName);
        thisRaceObj.setLOCK_PASS("");

        //Now that we have creatd the object, write it to the database
        try {
            //EditorMain.sqlMap.startTransaction();
            //get the data for this table (to be used later)
            Object d = EditorMain.sqlMap.update("updateRace", thisRaceObj);
            //EditorMain.sqlMap.commitTransaction();
        } catch (SQLException ex) {
            retVal = 0;
            log.error(ex);
        }finally{
            //EditorMain.sqlMap.endTransaction();
        }
        return retVal;
    }

    private boolean validateValues(){
        boolean retVal = true;
        if(!StringUtils.isNumber(this.spnr_AgeMod.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_AgeRoll.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_AgeSides.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_AgeMod.getValue())){
            retVal = false;
        }
        
        if(!StringUtils.isNumber(this.spnr_ChaMax.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_ChaMin.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_ChaMin.getValue())){
            retVal = false;
        }
        
        if(!StringUtils.isNumber(this.spnr_ConMax.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_ConMin.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_ConMod.getValue())){
            retVal = false;
        }
        
        if(!StringUtils.isNumber(this.spnr_DexMax.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_DexMaxMod.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_DexMin.getValue())){
            retVal = false;
        }
        
        if(!StringUtils.isNumber(this.spnr_HeightMod.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_HeightRoll.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_HeightSides.getValue())){
            retVal = false;
        }
        
        if(!StringUtils.isNumber(this.spnr_IntMax.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_IntMin.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_IntMod.getValue())){
            retVal = false;
        }
        
        if(!StringUtils.isNumber(this.spnr_MaxAgeMod.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_MaxAgeRoll.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_MaxAgeSides.getValue())){
            retVal = false;
        }
        
        if(!StringUtils.isNumber(this.spnr_StrMax.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_StrMaxMod.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_StrMin.getValue())){
            retVal = false;
        }
        
        if(!StringUtils.isNumber(this.spnr_WeightMod.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_WeightRoll.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_WeightSides.getValue())){
            retVal = false;
        }
        
        if(!StringUtils.isNumber(this.spnr_WisMax.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_WisMin.getValue())){
            retVal = false;
        }
        if(!StringUtils.isNumber(this.spnr_WisMod.getValue())){
            retVal = false;
        }
        
        return retVal;
    }
    
    private int saveXmlDoc(String raceId){
        
        int retVal = 1; //denotes a successful write.  If an exception is thrown, this will be set to zero.
        
        //if saving a new record, write out the xml document based on the values of the form
        org.dom4j.Document doc = DocumentHelper.createDocument();
        org.dom4j.Element root = doc.addElement("race").addAttribute("race_id", raceId);
        org.dom4j.Element nameElm = root.addElement("name").addText(this.jtf_RaceName.getText());
        
        org.dom4j.Element heightElm = root.addElement("height")
        .addAttribute("roll", this.spnr_HeightRoll.getValue().toString())
        .addAttribute("sides" , this.spnr_HeightSides.getValue().toString())
        .addAttribute("plusMod", this.spnr_HeightMod.getValue().toString());
        
        org.dom4j.Element weightElm = root.addElement("weight")
        .addAttribute("roll", this.spnr_WeightRoll.getValue().toString())
        .addAttribute("sides" , this.spnr_WeightSides.getValue().toString())
        .addAttribute("plusMod", this.spnr_WeightMod.getValue().toString());
        
        org.dom4j.Element ageDieElm = root.addElement("ageDice")
        .addAttribute("roll", this.spnr_AgeRoll.getValue().toString())
        .addAttribute("sides" , this.spnr_AgeSides.getValue().toString())
        .addAttribute("plusMod", this.spnr_AgeMod.getValue().toString());
        
        
        org.dom4j.Element maxAgeElm = root.addElement("maxAge")
        .addAttribute("roll", this.spnr_MaxAgeRoll.getValue().toString())
        .addAttribute("sides" , this.spnr_MaxAgeSides.getValue().toString())
        .addAttribute("plusMod", this.spnr_MaxAgeMod.getValue().toString());
        
        org.dom4j.Element baseMoveElm = root.addElement("baseMovement").addText(this.jtf_RaceMovement.getText());
        org.dom4j.Element abilitieReqElm = root.addElement("abilityRequirements");
        
        //TODO:  Loop to add multiples of this
        abilitieReqElm.addElement("requirement")
        .addAttribute("name", "Strength")
        .addAttribute("minimum", this.spnr_StrMin.getValue().toString())
        .addAttribute("maximum", this.spnr_StrMax.getValue().toString())
        .addAttribute("maxMod", this.spnr_StrMaxMod.getValue().toString());
        abilitieReqElm.addElement("requirement")
        .addAttribute("name", "Dexterity")
        .addAttribute("minimum", this.spnr_DexMin.getValue().toString())
        .addAttribute("maximum", this.spnr_DexMax.getValue().toString())
        .addAttribute("maxMod", this.spnr_DexMaxMod.getValue().toString());
        abilitieReqElm.addElement("requirement")
        .addAttribute("name", "Constitution")
        .addAttribute("minimum", this.spnr_ConMin.getValue().toString())
        .addAttribute("maximum", this.spnr_ConMax.getValue().toString())
        .addAttribute("maxMod", this.spnr_ConMod.getValue().toString());
        abilitieReqElm.addElement("requirement")
        .addAttribute("name", "Intelligence")
        .addAttribute("minimum", this.spnr_IntMin.getValue().toString())
        .addAttribute("maximum", this.spnr_IntMax.getValue().toString())
        .addAttribute("maxMod", this.spnr_IntMod.getValue().toString());
        abilitieReqElm.addElement("requirement")
        .addAttribute("name", "Wisdom")
        .addAttribute("minimum", this.spnr_WisMin.getValue().toString())
        .addAttribute("maximum", this.spnr_WisMax.getValue().toString())
        .addAttribute("maxMod", this.spnr_WisMod.getValue().toString());
        abilitieReqElm.addElement("requirement")
        .addAttribute("name", "Charisma")
        .addAttribute("minimum", this.spnr_ChaMin.getValue().toString())
        .addAttribute("maximum", this.spnr_ChaMax.getValue().toString())
        .addAttribute("maxMod", this.spnr_ChaMod.getValue().toString());
        
        //TODO:  Loop to add multiples of this
        org.dom4j.Element allowsMultiClassElm = root.addElement("allowedMultiClass");
        allowsMultiClassElm.addElement("class")
        .addAttribute("class_id", "CLASSIDNUMBER")
        .addText("NAMEOFCLASS");
        
        
        //Now that we have a document, save it to a file
        
        try {
            //TODO:  insert encryption process before saving the file
            XMLWriter writer = new XMLWriter(new FileWriter("resources/res02/" + thisRaceObj.getRACE_GUID() + ".xml"));
            writer.write(doc);
            writer.close();
        } catch (IOException ex) {
            retVal = 0;
            log.error(ex);
        }
        
        return retVal;
    }
    
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButton1 = new javax.swing.JButton();
        btn_Save = new javax.swing.JButton();
        jSplitPane1 = new javax.swing.JSplitPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jtf_RaceName = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        spnr_HeightMod = new javax.swing.JSpinner();
        jLabel5 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        spnr_HeightSides = new javax.swing.JSpinner();
        spnr_HeightRoll = new javax.swing.JSpinner();
        jLabel3 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        spnr_WeightRoll = new javax.swing.JSpinner();
        spnr_WeightSides = new javax.swing.JSpinner();
        spnr_WeightMod = new javax.swing.JSpinner();
        jPanel4 = new javax.swing.JPanel();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        spnr_AgeRoll = new javax.swing.JSpinner();
        spnr_AgeSides = new javax.swing.JSpinner();
        spnr_AgeMod = new javax.swing.JSpinner();
        jPanel5 = new javax.swing.JPanel();
        jLabel30 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        spnr_MaxAgeRoll = new javax.swing.JSpinner();
        spnr_MaxAgeSides = new javax.swing.JSpinner();
        spnr_MaxAgeMod = new javax.swing.JSpinner();
        jtf_RaceMovement = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel7 = new javax.swing.JPanel();
        spnr_StrMin = new javax.swing.JSpinner();
        spnr_StrMax = new javax.swing.JSpinner();
        spnr_StrMaxMod = new javax.swing.JSpinner();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jPanel8 = new javax.swing.JPanel();
        spnr_DexMax = new javax.swing.JSpinner();
        spnr_DexMin = new javax.swing.JSpinner();
        spnr_DexMaxMod = new javax.swing.JSpinner();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jPanel9 = new javax.swing.JPanel();
        spnr_ConMin = new javax.swing.JSpinner();
        spnr_ConMax = new javax.swing.JSpinner();
        spnr_ConMod = new javax.swing.JSpinner();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        spnr_IntMax = new javax.swing.JSpinner();
        spnr_IntMod = new javax.swing.JSpinner();
        spnr_IntMin = new javax.swing.JSpinner();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        spnr_WisMax = new javax.swing.JSpinner();
        spnr_WisMod = new javax.swing.JSpinner();
        spnr_WisMin = new javax.swing.JSpinner();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        spnr_ChaMod = new javax.swing.JSpinner();
        spnr_ChaMax = new javax.swing.JSpinner();
        spnr_ChaMin = new javax.swing.JSpinner();
        jLabel24 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        lst_ClassList = new javax.swing.JList();
        jPanel14 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jtf_Desc = new javax.swing.JTextPane();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextPane1 = new javax.swing.JTextPane();

        setPreferredSize(new java.awt.Dimension(800, 580));

        jButton1.setText("Cancel");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        btn_Save.setText("Save");
        btn_Save.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_SaveActionPerformed(evt);
            }
        });

        jSplitPane1.setDividerLocation(400);
        jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
        jSplitPane1.setOneTouchExpandable(true);

        jLabel1.setText("Name");

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Height"));

        spnr_HeightMod.setPreferredSize(new java.awt.Dimension(37, 20));

        jLabel5.setText("Mod:");

        jLabel4.setText("Sides:");

        spnr_HeightSides.setPreferredSize(new java.awt.Dimension(37, 20));

        spnr_HeightRoll.setPreferredSize(new java.awt.Dimension(37, 20));

        jLabel3.setText("Roll:");

        org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel3)
                    .add(jLabel4)
                    .add(jLabel5))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(spnr_HeightRoll, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(spnr_HeightSides, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(spnr_HeightMod, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel3)
                    .add(spnr_HeightRoll, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel4)
                    .add(spnr_HeightSides, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel5)
                    .add(spnr_HeightMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(44, Short.MAX_VALUE))
        );

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Weight"));

        jLabel2.setText("Roll:");

        jLabel6.setText("Sides:");

        jLabel7.setText("Mod:");

        spnr_WeightRoll.setPreferredSize(new java.awt.Dimension(37, 20));

        spnr_WeightSides.setPreferredSize(new java.awt.Dimension(37, 20));

        spnr_WeightMod.setPreferredSize(new java.awt.Dimension(37, 20));

        org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel3Layout.createSequentialGroup()
                        .add(jLabel7)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 18, Short.MAX_VALUE)
                        .add(spnr_WeightMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jPanel3Layout.createSequentialGroup()
                        .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabel2)
                            .add(jLabel6))
                        .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(spnr_WeightSides, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jPanel3Layout.createSequentialGroup()
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(spnr_WeightRoll, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 46, Short.MAX_VALUE)))))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel3Layout.createSequentialGroup()
                .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel2)
                    .add(spnr_WeightRoll, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel6)
                    .add(jPanel3Layout.createSequentialGroup()
                        .add(spnr_WeightSides, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel7)
                            .add(spnr_WeightMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(44, Short.MAX_VALUE))
        );

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Age"));

        jLabel27.setText("Roll:");

        jLabel28.setText("Sides:");

        jLabel29.setText("Mod:");

        spnr_AgeRoll.setPreferredSize(new java.awt.Dimension(37, 20));

        spnr_AgeSides.setPreferredSize(new java.awt.Dimension(37, 20));

        spnr_AgeMod.setPreferredSize(new java.awt.Dimension(37, 20));

        org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel28)
                    .add(jLabel27)
                    .add(jLabel29))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(spnr_AgeMod, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(spnr_AgeRoll, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(spnr_AgeSides, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel4Layout.createSequentialGroup()
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel27)
                    .add(spnr_AgeRoll, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel28)
                    .add(spnr_AgeSides, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel29)
                    .add(spnr_AgeMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(44, Short.MAX_VALUE))
        );

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Max Age"));

        jLabel30.setText("Roll:");

        jLabel31.setText("Sides:");

        jLabel32.setText("Mod:");

        spnr_MaxAgeRoll.setPreferredSize(new java.awt.Dimension(37, 20));

        spnr_MaxAgeSides.setPreferredSize(new java.awt.Dimension(37, 20));

        spnr_MaxAgeMod.setPreferredSize(new java.awt.Dimension(37, 20));

        org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel5Layout.createSequentialGroup()
                        .add(jLabel31)
                        .add(35, 35, 35)
                        .add(spnr_MaxAgeSides, 0, 38, Short.MAX_VALUE))
                    .add(jPanel5Layout.createSequentialGroup()
                        .add(jLabel30)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 44, Short.MAX_VALUE)
                        .add(spnr_MaxAgeRoll, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jPanel5Layout.createSequentialGroup()
                        .add(jLabel32)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 41, Short.MAX_VALUE)
                        .add(spnr_MaxAgeMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel5Layout.createSequentialGroup()
                .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel30)
                    .add(spnr_MaxAgeRoll, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel31)
                    .add(spnr_MaxAgeSides, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel32)
                    .add(spnr_MaxAgeMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(44, Short.MAX_VALUE))
        );

        jLabel8.setText("Movement");

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Ability Requirements"));

        spnr_StrMin.setPreferredSize(new java.awt.Dimension(37, 20));

        spnr_StrMax.setPreferredSize(new java.awt.Dimension(37, 20));

        spnr_StrMaxMod.setPreferredSize(new java.awt.Dimension(37, 20));

        jLabel9.setText("Minimum:");

        jLabel10.setText("Maximum:");

        jLabel11.setText("Max Modifier:");

        org.jdesktop.layout.GroupLayout jPanel7Layout = new org.jdesktop.layout.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel9)
                    .add(jLabel11)
                    .add(jLabel10))
                .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jPanel7Layout.createSequentialGroup()
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(spnr_StrMax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                        .add(jPanel7Layout.createSequentialGroup()
                            .add(41, 41, 41)
                            .add(spnr_StrMaxMod, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 42, Short.MAX_VALUE))
                        .add(jPanel7Layout.createSequentialGroup()
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(spnr_StrMin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                .add(369, 369, 369))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel9)
                    .add(spnr_StrMin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel10)
                    .add(spnr_StrMax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel11)
                    .add(spnr_StrMaxMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(58, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Strength", jPanel7);

        jLabel12.setText("Max Modifier:");

        jLabel13.setText("Maximum:");

        jLabel14.setText("Minimum:");

        org.jdesktop.layout.GroupLayout jPanel8Layout = new org.jdesktop.layout.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel14)
                    .add(jLabel13)
                    .add(jLabel12))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(spnr_DexMax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(spnr_DexMin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(spnr_DexMaxMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(406, Short.MAX_VALUE))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel14)
                    .add(spnr_DexMin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel13)
                    .add(spnr_DexMax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel12)
                    .add(spnr_DexMaxMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(58, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Dexterity", jPanel8);

        jLabel15.setText("Minimum");

        jLabel16.setText("Maximum");

        jLabel17.setText("Max Modifier:");

        org.jdesktop.layout.GroupLayout jPanel9Layout = new org.jdesktop.layout.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel15)
                    .add(jLabel16)
                    .add(jLabel17))
                .add(37, 37, 37)
                .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jPanel9Layout.createSequentialGroup()
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(spnr_ConMin, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 42, Short.MAX_VALUE))
                    .add(spnr_ConMax, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 42, Short.MAX_VALUE)
                    .add(spnr_ConMod, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 42, Short.MAX_VALUE))
                .addContainerGap(373, Short.MAX_VALUE))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel15)
                    .add(spnr_ConMin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(7, 7, 7)
                .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel16)
                    .add(spnr_ConMax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel17)
                    .add(spnr_ConMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(57, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Constitution", jPanel9);

        jLabel18.setText("Minimum:");

        jLabel19.setText("Maximum");

        jLabel20.setText("Max Modifier:");

        org.jdesktop.layout.GroupLayout jPanel10Layout = new org.jdesktop.layout.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jPanel10Layout.createSequentialGroup()
                        .add(jLabel19)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 97, Short.MAX_VALUE)
                        .add(spnr_IntMax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel10Layout.createSequentialGroup()
                        .add(jLabel20)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 76, Short.MAX_VALUE)
                        .add(spnr_IntMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jPanel10Layout.createSequentialGroup()
                        .add(jLabel18)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 97, Short.MAX_VALUE)
                        .add(spnr_IntMin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .add(366, 366, 366))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(spnr_IntMin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel18))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(spnr_IntMax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel19))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel20)
                    .add(spnr_IntMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jTabbedPane1.addTab("Intelligence", jPanel10);

        jLabel21.setText("Minimum:");

        jLabel22.setText("Maximum");

        jLabel23.setText("Max Modifier:");

        org.jdesktop.layout.GroupLayout jPanel11Layout = new org.jdesktop.layout.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jPanel11Layout.createSequentialGroup()
                        .add(jLabel22)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 77, Short.MAX_VALUE)
                        .add(spnr_WisMax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jPanel11Layout.createSequentialGroup()
                        .add(jLabel23)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 56, Short.MAX_VALUE)
                        .add(spnr_WisMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jPanel11Layout.createSequentialGroup()
                        .add(jLabel21)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 77, Short.MAX_VALUE)
                        .add(spnr_WisMin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .add(366, 366, 366))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(spnr_WisMin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel21))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(spnr_WisMax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel22))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 43, Short.MAX_VALUE)
                .add(jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(spnr_WisMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel23))
                .add(21, 21, 21))
        );

        jTabbedPane1.addTab("Wisdom", jPanel11);

        jLabel24.setText("Max Modifier:");

        jLabel25.setText("Minimum:");

        jLabel26.setText("Maximum:");

        org.jdesktop.layout.GroupLayout jPanel12Layout = new org.jdesktop.layout.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel25)
                    .add(jLabel26)
                    .add(jLabel24))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(spnr_ChaMax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(spnr_ChaMin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(spnr_ChaMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(406, 406, 406))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel25)
                    .add(spnr_ChaMin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(spnr_ChaMax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel26))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(spnr_ChaMod, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel24))
                .add(58, 58, 58))
        );

        jTabbedPane1.addTab("Charisma", jPanel12);

        org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel6Layout.createSequentialGroup()
                .add(jTabbedPane1)
                .addContainerGap())
        );

        jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder("Allowable Classes"));

        lst_ClassList.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane2.setViewportView(lst_ClassList);

        org.jdesktop.layout.GroupLayout jPanel13Layout = new org.jdesktop.layout.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 156, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel13Layout.createSequentialGroup()
                .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder("Description"));

        jScrollPane3.setViewportView(jtf_Desc);

        org.jdesktop.layout.GroupLayout jPanel14Layout = new org.jdesktop.layout.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 273, Short.MAX_VALUE)
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE)
        );

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(jLabel1)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jtf_RaceName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 323, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabel8)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jtf_RaceMovement, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 102, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(jPanel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel13, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel14, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel1)
                    .add(jLabel8)
                    .add(jtf_RaceMovement, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jtf_RaceName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel13, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jPanel14, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        jSplitPane1.setTopComponent(jPanel1);

        jTextPane1.setBackground(new java.awt.Color(0, 0, 0));
        jTextPane1.setForeground(new java.awt.Color(255, 255, 255));
        jScrollPane1.setViewportView(jTextPane1);

        jSplitPane1.setRightComponent(jScrollPane1);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jSplitPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 780, Short.MAX_VALUE)
                    .add(layout.createSequentialGroup()
                        .add(btn_Save)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jButton1)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .add(jSplitPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 529, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jButton1)
                    .add(btn_Save))
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents
    
    private void btn_SaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_SaveActionPerformed
        
        if (isNew){
            if (validateValues()){
                String newRaceId = RandomGUID.getUsableGuid();
                try {
                    
                    //first, try and enter the new data into the database
                   EditorMain.sqlMap.startTransaction();
                    
                    int dataEntry = createDataObj(newRaceId);
                    if (dataEntry == 1){//means success
                        log.error("Data object saved!");
                        int fileSave = saveXmlDoc(newRaceId);
                        if (fileSave == 1){//means success    
                            EditorMain.sqlMap.commitTransaction();
                        }else{
                            log.error("New Race Record was not saved!");

                        }
                        
                    }else{
                        log.error("data object not saved!");
                    }
                } catch (SQLException ex) {
                    ex.printStackTrace();
                } finally {
                    try {
                        EditorMain.sqlMap.endTransaction();
                    } catch (SQLException ex) {
                        ex.printStackTrace();
                    }
                }
                
            }else{
                JOptionPane.showMessageDialog(EditorMain.p_mainFrame,
                    "One or more value contained invalid values!",
                    "Validation Error",
                    JOptionPane.ERROR_MESSAGE);
            }

        }else{
            //this was a saved object.
            if (validateValues()){
                try {

                    //first, try and enter the new data into the database
                   EditorMain.sqlMap.startTransaction();

                    int dataEntry = saveDataObj(thisRaceObj.getRACE_GUID());
                    if (dataEntry == 1){//means success
                        log.error("Data object saved!");

                        // A File object to represent the filename
                        //File f = new File("resources/res02/" + thisRaceObj.getRACE_GUID() + ".xml");

                        int fileSave = saveXmlDoc(thisRaceObj.getRACE_GUID());
                        if (fileSave == 1){//means success
                            EditorMain.sqlMap.commitTransaction();
                        }else{
                            log.error("New Race Record was not saved!");

                        }

                    }else{
                        log.error("data object not saved!");
                    }
                } catch (SQLException ex) {
                    ex.printStackTrace();
                } finally {
                    try {
                        EditorMain.sqlMap.endTransaction();
                    } catch (SQLException ex) {
                        ex.printStackTrace();
                    }
                }

            }else{
                JOptionPane.showMessageDialog(EditorMain.p_mainFrame,
                    "One or more value contained invalid values!",
                    "Validation Error",
                    JOptionPane.ERROR_MESSAGE);
            }
        }
        
        
    }//GEN-LAST:event_btn_SaveActionPerformed
    
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        PanelSwapper.swap(new pnl_RacesList(), this);
        try {
            if (this.getParent() != null){
                this.getParent().remove(this);
            }
            this.finalize();
        } catch (Throwable ex) {
            ex.printStackTrace();
        }
    }//GEN-LAST:event_jButton1ActionPerformed
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btn_Save;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JSplitPane jSplitPane1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextPane jTextPane1;
    private javax.swing.JTextPane jtf_Desc;
    private javax.swing.JTextField jtf_RaceMovement;
    private javax.swing.JTextField jtf_RaceName;
    private javax.swing.JList lst_ClassList;
    private javax.swing.JSpinner spnr_AgeMod;
    private javax.swing.JSpinner spnr_AgeRoll;
    private javax.swing.JSpinner spnr_AgeSides;
    private javax.swing.JSpinner spnr_ChaMax;
    private javax.swing.JSpinner spnr_ChaMin;
    private javax.swing.JSpinner spnr_ChaMod;
    private javax.swing.JSpinner spnr_ConMax;
    private javax.swing.JSpinner spnr_ConMin;
    private javax.swing.JSpinner spnr_ConMod;
    private javax.swing.JSpinner spnr_DexMax;
    private javax.swing.JSpinner spnr_DexMaxMod;
    private javax.swing.JSpinner spnr_DexMin;
    private javax.swing.JSpinner spnr_HeightMod;
    private javax.swing.JSpinner spnr_HeightRoll;
    private javax.swing.JSpinner spnr_HeightSides;
    private javax.swing.JSpinner spnr_IntMax;
    private javax.swing.JSpinner spnr_IntMin;
    private javax.swing.JSpinner spnr_IntMod;
    private javax.swing.JSpinner spnr_MaxAgeMod;
    private javax.swing.JSpinner spnr_MaxAgeRoll;
    private javax.swing.JSpinner spnr_MaxAgeSides;
    private javax.swing.JSpinner spnr_StrMax;
    private javax.swing.JSpinner spnr_StrMaxMod;
    private javax.swing.JSpinner spnr_StrMin;
    private javax.swing.JSpinner spnr_WeightMod;
    private javax.swing.JSpinner spnr_WeightRoll;
    private javax.swing.JSpinner spnr_WeightSides;
    private javax.swing.JSpinner spnr_WisMax;
    private javax.swing.JSpinner spnr_WisMin;
    private javax.swing.JSpinner spnr_WisMod;
    // End of variables declaration//GEN-END:variables
    
}
